//动态导入json数据
				
var xmlRequest = createXHQ();

xmlRequest.open("GET","../json/informationShopp.json");
xmlRequest.send();

xmlRequest.onreadystatechange=function(){
	
	if(xmlRequest.readyState===4){
		if(xmlRequest.status===200){
			var result1 = xmlRequest.responseText;
			var resultObject = JSON.parse(result1);	
			
			var str = "";
			for(var i=0;i<resultObject.shopMainImg.length;i++){
				str +=	"<div>"+		
							"<img src="+ resultObject.shopMainImg[i] +" />"+			
						"</div>";
			}
			
			var f_div = document.getElementById("main");
				
			var z_main=	"<div class='m-head'>"+
							"<span>"+ resultObject.shopRoot +"&nbsp;></span><span>"+ resultObject.shopF +"&nbsp;></span><span>"+ resultObject.shopName +"</span>	"+
						"</div>"+
						
						"<div>"+
						
							"<div class='shopping'>"+
								"<div class='image-shopping'>"+
									"<div class='image-main'>"	+
									"<img src="+ resultObject.imgBig +" />"+		
								"</div>"+	
								
								"<div class='image-m-li'>"+	
									"<ul>"+		
										"<li><img src="+ resultObject.imgSmall[0] +" /></li>"+			
										"<li><img src="+ resultObject.imgSmall[1] +" /></li>"+
										"<li><img src="+ resultObject.imgSmall[2] +" /></li>"+
										"<li><img src="+ resultObject.imgSmall[3] +" /></li>"+
									"</ul>"	+								
								"</div>"+	
								
							"</div>"+
							
							"<div class='m-right'>"+
							
								"<div class='title-shopping'>"+
									"<span class='s-t1'>"+ resultObject.shopDescribe +"</span>"+		
									"<span class='s-t2'>勾选[保障服务][原厂保2年]，获得原厂+全方位服务计划，原厂延保售后无忧。</span>"+		
									"<span class='s-t3'>秒杀价：￥<strong>"+ resultObject.shopMoney +"</strong></span>"+		
									"<span class='s-t4'>配送至：由 <strong>顺丰</strong> 发货, 并提供售后服务. 现在至明天15:00前下单,预计05月21日(周一)送达</span>"+		
									"<span class='s-t5'>重量："+ resultObject.shopWeight +"kg</span>"	+	
								"</div>"+	
								
								"<div class='btn-shopping'>"+	
									"<input type='number' class='s-btn1' value='1' />"+		
									"<a href="+ "#" +"><input type='button' class='s-btn2' value='加入购物车>' /></a><br />"+		
									"<span>温馨提示支持7天无理由退货(激活后不支持)</span>"	+	
								"</div>"+	
								
							"</div>"+
							
						"</div>"+
						
						"<div id='main-img'>"+	
							"<h1>——————商品展示——————</h1>"+	
							str+
						"</div>";
								
							
				
			f_div.innerHTML=z_main;
				
			
		}else{
			alert("错误信息："+xmlRequest.status);
		}
	}
}
	
window.onload=function(){
	
	document.getElementsByClassName("s-btn1")[0].onblur=function(){
		
		var num = document.getElementsByClassName("s-btn1")[0].value;
		
		bijiao("s-btn1",num);
		
	}
	
}